<fieldset>
    <legend>Product</legend>

    <div style="text-align: right">
        <a href="<?php echo site_url(); ?>/product/add">Thêm product</a>
    </div>
    <hr/>
    <table>
        <tr>
            <th>Thumb</th>
            <th>CategoryID</th>
            <th>Code</th>
            <th>Name</th>
            <th>Price</th>
            <th>Status</th>
            <th>CreateDate</th>
            <th>Action</th>
        </tr>
        <?php
        if($productList)
        {
            //var_dump($productList);

            foreach($productList as $product)
            {
        ?>
        <tr>
            <td>
                <img src="" width="50" height="50" title="<?php echo $product['Name']; ?>" alt="<?php echo $product['Name']; ?>"/>
            </td>
            <td><?php echo $product['CategoryID']; ?></td>
            <td><?php echo $product['Code']; ?></td>
            <td><?php echo $product['Name']; ?></td>
            <td><?php echo $product['Price']; ?></td>
            <td><?php echo $product['Status']; ?></td>
            <td><?php echo strftime("%d/%m/%Y <br/> %H:%M:%S", $product['CreateDate']); ?></td>
            <td>
                <a href="<?php echo site_url(); ?>/product/update/id/<?php echo $product['ProductID']; ?>">Edit</a><br/>
                <a href="<?php echo site_url(); ?>/product/remove/id/<?php echo $product['ProductID']; ?>" onclick="return confirm('Are you sure?');">Delete</a>
            </td>
        </tr>
        <?php
            }
        }
        ?>
    </table>
</fieldset>